package com.yan.design.two.establish.s4.builder1;

/**
 * 四.建造者模式
 *      抽象方法 - 建造者
 * @author shengren.yan
 * @create 2022-07-17
 */
public class Worker extends Builder{

    Product product = null;

    public Worker(){
        product = new Product();
    }

    @Override
    void buildA() {
        product.setBuildA("调用A---");
        System.out.println("调用A--");
    }

    @Override
    void buildB() {
        product.setBuildB("调用B---");
        System.out.println("调用B--");
    }

    @Override
    void buildC() {
        product.setBuildC("调用C---");
        System.out.println("调用C--");
    }

    @Override
    Product getProduct() {
        return product;
    }

}
